//
//  JKSonTagPart.m
//  JackToolsBox
//
//  Created by Jack Xue on 2019/12/11.
//  Copyright © 2019 Jack Xue. All rights reserved.
//

#import "JKSonTagPart.h"
@interface JKSonTagPart(){
    UIView *_redView;
}
@end
/*
 JKSonTagPart : JKTagPart
 可以实现类似自定义cell的效果
 */
@implementation JKSonTagPart

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self makeCustomUserInterface];
    }
    return self;
}

-(void)makeCustomUserInterface{
    _redView = [[UIView alloc]init];
    _redView.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:_redView];
}

-(void)layoutSubviews{
    [super layoutSubviews];
    //此时已经获取到正确的bounds
    _redView.frame = CGRectMake(self.contentView.frame.size.width-20, self.contentView.frame.size.height-20, 20, 20);
}


@end
